package org.ssm.service.impl;

import org.springframework.stereotype.Service;
import org.ssm.dao.EbookTypeMapper;
import org.ssm.pojo.EbookType;
import org.ssm.service.EbookTypeService;

import javax.annotation.Resource;
import java.util.List;

@Service("ebookTypeService")
public class EbookTypeServiceImpl implements EbookTypeService {
    @Resource
    EbookTypeMapper ebookTypeMapper;

    @Override
    public int save(EbookType ebookType) {
        return ebookTypeMapper.save(ebookType);
    }

    @Override
    public int update(EbookType ebookType) {
        return ebookTypeMapper.update(ebookType);
    }

    @Override
    public EbookType getOneEbookType(int id) {
        return ebookTypeMapper.getOneEbookType(id);
    }

    @Override
    public int getRecordCount(EbookType ebookType) {
        return ebookTypeMapper.getRecordCount(ebookType);
    }

    @Override
    public List<EbookType> getEbookTypeListByPage(EbookType ebookType) {
        return ebookTypeMapper.getEbookTypeListByPage(ebookType);
    }

    @Override
    public List<EbookType> getTopEbookTypeList() {
        return ebookTypeMapper.getTopEbookTypeList();
    }

    @Override
    public List<EbookType> getAllEbookTypeList() {
        return ebookTypeMapper.getAllEbookTypeList();
    }

    @Override
    public int delete(int id) {
        return ebookTypeMapper.delete(id);
    }

    @Override
    public int deleteAll(String[] ids) {
        return ebookTypeMapper.deleteAll(ids);
    }
}
